﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Markup;


namespace DiscoveryLogic.UI.Layouts.Controls
{
    public class ChartBrushes
    {

        public static Brush GetBrush(int x)
        {
            return  XamlLoader<Brush>.Create (GetBrushString(x)); 
        } 
        public static string GetBrushString(int x)
        {
            //  return Gradients[x % Gradients.Length]; 

            return string.Format("<SolidColorBrush Color=\"{0}\" />", Brushes[x % Brushes.Length]);
        }

        static string[] Brushes = new string[] 
                                   { 
                      //                 "#FFFFF0A5" ,
                                       "#FFFFB03B", 
                        //               "#FFB64926" , 
                                       "#FFC03000" , 
                                       "#FF32331D" , 
                                       "#FF787746" , 
                                       "#FFB4AF91" , 
                                       "#FF8E2800", 
                                       "#FF40411E" 
                                   };

        static string[] Gradients = new string[]
        { 
        "<LinearGradientBrush  xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'  EndPoint='0.541,1.055' StartPoint='0.534,-0.035'>" + 
		"<GradientStop Color='#FFFFF0A5' Offset='0.159'/>" + 
		"<GradientStop Color='#FFFFFFFF' Offset='0.966'/>" + 
		"<GradientStop Color='#FFFFFFFF' Offset='0'/>" + 
		"<GradientStop Color='#FFFFF0A5' Offset='0.856'/>" + 
	    "</LinearGradientBrush>" , 
	"<LinearGradientBrush xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'  EndPoint='0.542,1.082' StartPoint='0.534,-0.035'>" + 
		"<GradientStop Color='#FFFFB03B' Offset='0.159'/>" + 
		"<GradientStop Color='#FFFFFFFF' Offset='0.966'/>" + 
		"<GradientStop Color='#FFFFFFFF' Offset='0'/>" + 
		"<GradientStop Color='#FFFFB03B' Offset='0.837'/>" + 
	"</LinearGradientBrush>" ,   
	"<LinearGradientBrush xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'   EndPoint='0.509,1.082' StartPoint='0.534,-0.035'>" + 
		"<GradientStop Color='#FFB64926' Offset='0.159'/>" + 
		"<GradientStop Color='#FFFFFFFF' Offset='0.966'/>" + 
		"<GradientStop Color='#FFFFFFFF' Offset='0'/>" + 
		"<GradientStop Color='#FFB64926' Offset='0.889'/>" + 
	"</LinearGradientBrush>" , 
	"<LinearGradientBrush xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'   EndPoint='0.491,1.055' StartPoint='0.534,-0.035'>" + 
		"<GradientStop Color='#FFC03000' Offset='0.154'/>" + 
		"<GradientStop Color='#FFFFFFFF' Offset='0.966'/>" + 
		"<GradientStop Color='#FFFFFFFF' Offset='0'/>" + 
		"<GradientStop Color='#FFC03000' Offset='0.904'/>" + 
	"</LinearGradientBrush>" ,  
	"<LinearGradientBrush xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'   EndPoint='0.545,1.07' StartPoint='0.534,-0.035'>" + 
		"<GradientStop Color='#FF32331D' Offset='0.154'/>" + 
		"<GradientStop Color='#FFFFFFFF' Offset='1'/>" + 
		"<GradientStop Color='#FFFFFFFF' Offset='0'/>" + 
		"<GradientStop Color='#FF32331D' Offset='0.899'/>" + 
	"</LinearGradientBrush>" ,  
	"<LinearGradientBrush xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'  EndPoint='0.545,1.07' StartPoint='0.534,-0.035'>" + 
		"<GradientStop Color='#FF787746' Offset='0.154'/>" + 
		"<GradientStop Color='#FFFFFFFF' Offset='1'/>" + 
		"<GradientStop Color='#FFFFFFFF' Offset='0'/>" + 
		"<GradientStop Color='#FF787746' Offset='0.899'/>" + 
	"</LinearGradientBrush>" ,  
	"<LinearGradientBrush xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'   EndPoint='0.545,1.07' StartPoint='0.534,-0.035'>" + 
		"<GradientStop Color='#FFB4AF91' Offset='0.154'/>" + 
		"<GradientStop Color='#FFFFFFFF' Offset='1'/>" + 
		"<GradientStop Color='#FFFFFFFF' Offset='0'/>" + 
		"<GradientStop Color='#FFB4AF91' Offset='0.899'/>" + 		
	"</LinearGradientBrush>" , 
	"<LinearGradientBrush xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'   EndPoint='0.527,1.077' StartPoint='0.534,-0.035'>" + 
			"<GradientStop Color='#FF8E2800' Offset='0.154'/>" + 
			"<GradientStop Color='#FFFFFFFF' Offset='0.966'/>" + 
			"<GradientStop Color='#FFFFFFFF' Offset='0'/>" + 
			"<GradientStop Color='#FF8E2800' Offset='0.889'/>" + 
		"</LinearGradientBrush>" +  
		"<LinearGradientBrush xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'   EndPoint='0.545,1.07' StartPoint='0.534,-0.035'>" + 
			"<GradientStop Color='#FF40411E' Offset='0.154'/>" + 
			"<GradientStop Color='#FFFFFFFF' Offset='1'/>" + 
			"<GradientStop Color='#FFFFFFFF' Offset='0'/>" + 
			"<GradientStop Color='#FF40411E' Offset='0.899'/>" + 
		"</LinearGradientBrush>" 
        };


    } 
         
}
